<template>
	<view class="box" :style="{'padding-top':systemHeight+28.5+'px'}">
		<view class="head">
			<image class="back" src="/static/img/back.png" @click="back"></image>
			<view class="title">Cards</view>
			<view class="right"></view>
		</view>
		
		<view class="content">
			<view class="card" @click="Card('2')">
				<image class="img" src="/static/img/visa_1.png"></image>
				<view>
					<view>Visa</view>
					<view class="nums">4392268888888888</view>
				</view>
			</view>
			<view class="card" @click="Card('1')">
				<image class="img" src="/static/img/pay_1.png"></image>
				<view>
					<view>Visa</view>
					<view class="nums">Add Mastercard</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemHeight: null,
			}
		},
		created() {
			this.systemHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			back() {
				uni.navigateBack()
			},
				//添加银行卡 1是添加、2是解绑
			Card(type){
				uni.navigateTo({
					url:`/pages/pay/card?type=${type}`
				})
			}
		}
	}
</script>

<style>
	.box {background: #FAFAFA;
		position: fixed;
		width: 100%;
		height: 100vh;
	}

	.head {
		margin: 0rpx auto 48rpx;
		width: 92%;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.back {
		width: 20rpx;
		height: 36rpx;
	}

	.title {
		font-family: Mont;
		font-weight: bold;
		font-size: 32rpx;
	}

	.right {
		width: 20rpx;
	}
	.content{
		overflow: auto;
		height: 78vh;
		margin: 0rpx auto;
	}
	.card {
		margin: 0rpx auto 30rpx;
		width: 92%;
		height: 190rpx;
		background: #FFFFFF;
		box-shadow: -10rpx -1rpx 50rpx 0rpx rgba(55, 55, 55, 0.08);
		border-radius: 30rpx;
		display: flex;
		align-items: center;
		font-family: Mont;
		font-weight: bold;
		font-size: 36rpx;
	}

	.img {
		width: 130rpx;
		height: 100rpx;
		margin-right: 30rpx;
		margin-left: 30rpx;
	}

	.nums {
		margin-top: 30rpx;
		font-family: Mont;
		font-weight: 500;
		font-size: 30rpx;
		color: #6B6B6B;
	}
</style>